package com.fan.springboot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.fan.springboot.dao.SongDao;
import com.fan.springboot.domain.Song;

@Service
public class SongService {

	@Autowired
	private SongDao songDao;

	public Song findOne(String id) {
		return songDao.findOne(id);
	}

	public List<Song> findAll() {
		return songDao.findAll();
	}

	public Page<Song> findAll(Pageable pageable) {
		return songDao.findAll(pageable);
	}

	public Song save(Song song) {
		return songDao.save(song);
	}
	
	public void delete(String id) {
		songDao.delete(id);
	}

}
